import { constantRoutes } from '@/router'
import request from '@/utils/request'
//获得品牌列表接口 /admin/product/baseTrademark/{page}/{limit}
export const reqTradeMarkList = (page, limit) => request({ url: `/admin/product/baseTrademark/${page}/${limit}`, method: 'get' })

//新增品牌或者修改品牌
export const reqAddOrEditTrademark = (trademark) => {
    if (trademark.id) {
        //修改品牌
        return request({ url: `/admin/product/baseTrademark/update`, method: 'put', data: trademark })
    }
    else {
        return request({ url: `/admin/product/baseTrademark/save`, method: 'post', data: trademark })
    }
}
//删除品牌请求
export const reqDeleteTradeMark = (id) => request({ url: `/admin/product/baseTrademark/remove/${id}`, method: 'delete' })